#include "List.h"

// ���������� ������ m_Data ������ ����� ������ �������, �� ������� ��������� pc 
Node::Node(Node* Prev, const Circle* pc) :m_Data(*pc)
{
	pPrev = Prev;
	pNext = Prev->pNext;

	Prev->pNext = this;
	pNext->pPrev = this;
}

Node::~Node()
{
	if (pPrev) { pPrev->pNext = /*this->*/pNext; }
	if (pNext) { pNext->pPrev = /*this->*/pPrev; }

	pPrev = pNext = nullptr;
	//delete[] this;
}

std::ostream& operator<<(std::ostream& os, const Node& node)
{
	os << node.m_Data;
	return os;
}